package com.huatec.hiot_cloud.core.authorization.manager;

import com.huatec.hiot_cloud.core.entity.User;

public class PermissionManager {
    public static boolean roleStaff(User user){
        int sta = user.getIs_staff() == null ? 0 : user.getIs_staff();
        if(sta == 1) {
            return true;
        }
        return false;
    }

    public static boolean roleDeveloper(User user){
        int sta = user.getIs_developer() == null ? 0 : user.getIs_developer();
        if(sta == 1) {
            return true;
        }
        return false;
    }

    public static boolean roleAdmin(User user){
        int sta = user.getIs_supperuser() == null ? 0 : user.getIs_supperuser();
        if(sta == 1) {
            return true;
        }
        return false;
    }

}
